<?php

$fp = fsockopen('localhost', 54321) or die("connect error");
$fp1 = fsockopen('localhost', 54321) or die("connect error");
$str = "hello";
$str .= "hello";
$len = strlen($str);
$abc = sprintf("%c%c%c%c$str", $len, 0, 0, 0);

fputs($fp, $abc);
fputs($fp1, $abc);
fputs($fp, $abc);
fputs($fp1, $abc);
fputs($fp, $abc);
fputs($fp1, $abc);

fclose($fp1);
fclose($fp);

